function patterns = generatePatterns( N )
% GENERATEPATTERNS
    global PERCENT;
    global LOWER_BOUND;
    global UPPER_BOUND;
    global DEVIATION;
    
    
    patterns = [];
    
    
    
    for t = 1:N
        
       r = (random('Normal', 0, DEVIATION)+0.01)*PERCENT;
       tetha = randInter(0, pi);
       
       x = r * cos(tetha);
       y = r * sin(tetha);
       
       
       if (mod(t, 2)==0)
           %Generacion de puntos del pico A (-1, 1)
           patterns(t, 1) = x - 1;
           patterns(t, 2) = y + 1;
       else
           %Generacion de puntos del pico B (1, -1)
           patterns(t, 1) = x + 1;
           patterns(t, 2) = y - 1;
       end    
    end
    
    
    append = [];
    
    for t = 1:N
        if LOWER_BOUND <= patterns(t, 1) && patterns(t, 1) <= UPPER_BOUND && LOWER_BOUND <= patterns(t, 2) && patterns(t, 2) <= UPPER_BOUND
            append = [append ; patterns(t, :)];
        end
    end
    
    patterns = append';
    
    

end
